﻿using System.Collections.Generic;

namespace HK.Core.Utils
{
    /// <summary>
    /// 工具类:字符串.
    /// </summary>
    public static class UtilsString
    {
        /// <summary>
        /// 比较不同
        /// </summary>
        /// <param name="iStrA">字符串A</param>
        /// <param name="iStrB">字符串B</param>
        /// <returns>true:不同; false:相同;</returns>
        public static bool Diff(string iStrA, string iStrB)
        {
            if (string.IsNullOrEmpty(iStrA) && string.IsNullOrEmpty(iStrB)) return false;
            if (string.IsNullOrEmpty(iStrA) && !string.IsNullOrEmpty(iStrB)) return true;
            if (!string.IsNullOrEmpty(iStrA) && string.IsNullOrEmpty(iStrB)) return true;
            
            return !string.IsNullOrEmpty(iStrA) && !iStrA.Equals(iStrB);
        }

    }
}